<template>
  <div class="intro_container">

    <div class="intro">
      <div class="content">
        <span class="name">
          规则说明
        </span>
        <p>
          确认过眼神 你就是 下一个普法达人
        </p>
      </div>
    </div>

    <div class="step">
      <van-button @click="toNext(1)">开始答题</van-button>
      <van-button @click="toNext(2)"> 查看排行榜</van-button>
    </div>

  </div>
</template>
<script>
import path from '@/network'
export default {
  name: 'App',
  data () {
    return {

    };
  },

  mounted () {
    this.getIntro()
  },
  methods: {

    getIntro: function () {
      path.getThoughGame({
        type: 1
      }).then(res => {
        if (res.success === 0) {
          if (res.rows) {
            console.log(res)
          }
        }
      })
    },



    toNext: function (id) {
      console.log(id)
      if (id == 1) {
        this.$router.push({ name: 'gameLoading', query: { type: 1 } })
      } else {
        this.$router.push({ name: 'throughGameRanking' })
      }

    },
  }
}
</script>